package Modelo;

import java.awt.Color;
import java.io.Serializable;

/**
 *
 * @author tin
 */
abstract public class Movil  extends Figuras implements Serializable {
   
    
        private static final long serialVersionUID = 1L;
	Integer checkpoint;
        Escenario escenario;
        protected Integer dx = 2;
        protected Integer dy = 2;
        
        public Movil(Integer id0, Integer x0,Integer y0,Integer w0,Integer h0,Color c,Integer vida, Boolean estado, Escenario e){
            super(id0, x0,y0,h0,w0,c,vida,estado);
            checkpoint=0;
            escenario = e;
        }
      
        
        
        public void arriba(){
            this.yAnterior = y;
            y -= dy;
        }

         public void abajo(){
            this.yAnterior = y;
            y += dy;
        }
         
        public void derecha(){
            this.xAnterior = x;
            x += dx;
        }
        
        public void izquierda(){
            this.xAnterior = x;
            x -= dx;
        }
        
     
     
    
        
        
    @Override
    public void colision(Autito movil) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public void colision(Pared pared) {
      System.out.println("Soy el poli" + this.id.toString() + " y me choque con " + pared.getID()  );
        
    }

    @Override
    public void colision(Base base) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public void colision(Destino destino) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

     @Override
    public void colision(Policia policia) {
        throw new UnsupportedOperationException("Not supported yet.");
    }
    
     

}
